<template>
    <van-nav-bar title="首页" />
        <van-search v-model="value" show-action label="地址" placeholder="请输入搜索关键词" @search="onSearch">
            <template #action>
                <van-icon name="list-switching" style="margin-left: 100px;" size="20" @click="fenlei"/>
            </template>
        </van-search>
    <van-tabs v-model:active="active" animated>
        <van-tab title="推荐">
            <Swipe :images="images"></Swipe>
        </van-tab>
        <van-tab title="美食">内容 2</van-tab>
        <van-tab title="运动">内容 3</van-tab>
        <van-tab title="保健品">内容 4</van-tab>
        <van-tab title="内衣">内容 4</van-tab>
        <van-tab title="更多">内容 4</van-tab>
    </van-tabs>
</template>

<script setup>
import { swiperdataApi } from '@/api/api';
import Swipe from '@/components/Swipe.vue';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
let images = ref([])
swiperdataApi().then(res => {
    images.value = res.data.message
})
let router=useRouter()
let fenlei=()=>{
    router.push('/home/cla')
}
</script>

<style lang="scss" scoped></style>